<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="/struts-tags" %>



<c:import url="/view/admin/include/header/adminHeader.jsp"></c:import>
    <!-- 컨텐츠 부분 -->
	<div id="container">
    	<!-- 왼쪽 메뉴 부분 -->
    	<c:import url="/view/admin/include/left/adminLeft.jsp"></c:import>
        <!-- 왼쪽 메뉴 부분 -->
        <!-- 오른쪽 내용 부분 -->
        <dl>
        	<dd class="path">
        	홈 > 게시판 관리 > 
        		<span class="path_b">
        			소송진행 현황
        		</span>
        	</dd>
        </dl>
        <dl class="content">
            <dd class="summary">
       <%--  <li>
 		<a href="/admin/caseDetail.hcom?case_seq=${case_seq}&mem_dept=${mem_dept}">
   		<img src=""/>기본정보
   		</a>
   		</li>
   		<li>
 		<a href="/admin/caseDetail1.hcom?case_seq=${case_seq}&court_step=1">
   		<img src=""/>1
   		</a>
   		</li>
   		<li>
 		<a href="/admin/caseDetail2.hcom?case_seq=${case_seq}&court_step=2">
   		<img src=""/>2
   		</a>
   		</li>
   		<li>
 		<a href="/admin/caseDetail3.hcom?case_seq=${case_seq}&court_step=3">
   		<img src=""/>대법원
   		</a>
   		</li> --%>
   		 <ul class="tab qna_box">
           <a href="/admin/caseDetail.hcom?case_seq=${case_seq}&mem_dept=${mem_dept}"><li class="on">기본정보</li></a>
	       <a href="/admin/caseDetail1.hcom?case_seq=${case_seq}&court_step=1&mem_dept=${mem_dept}"><li class="off">제1심</li></a>
	       <a href="/admin/caseDetail2.hcom?case_seq=${case_seq}&court_step=2&mem_dept=${mem_dept}"><li class="off">제2심</li></a>
	       <a href="/admin/caseDetail3.hcom?case_seq=${case_seq}&court_step=3&mem_dept=${mem_dept}"><li class="off">대법원</li></a>
        </ul>
            	<form id="boardFrm" name="boardFrm" action="/admin/caseReg.hcom" method="post" enctype="multipart/form-data">
            	<input type="hidden" name="mem_no"	value="<s:property value="#session.id" />"> 
            	<input type="hidden" name="writer" value="<s:property value="#session.name" />">
            	<input type="hidden" id="save_type" name="save_type" value="case" />
            	<input type="hidden" id="mem_dept" name="mem_dept" value="${mem_dept}" />
            	<input type="hidden" id="case_seq" name="case_seq" value="${case_seq}" />
          <span class="left f_orange">※ 진행 중이거나 완료된 소송기록을 확인하실 수 있습니다.</span>
           <p class="align_r">
           <a id="/admin/Printecase.hcom?case_seq=${case_seq}&mem_dept=${mem_dept}" onClick="Pop_info6(this.id);" style="cursor: pointer"><img src="/images/common/btn_print.gif" width="50" height="19" alt="인쇄" /></a></p>
            	<table cellspacing="0" cellpadding="0" summary="" >
                	<caption></caption>
                    	 <colgroup>
                          <col width="15%;"/>
                          <col width="45%;"/>
                          <col width="10%;"/>
                          <col width="30%"/>
                         </colgroup>
                    <tbody>
                    	<tr>
                        	<th scope="row" class="table_txt_left">작성자</th>
                            <td class="table_txt_left f_blue">${boardView.writer }</td>
                            <th scope="row" class="table_txt_left">프로젝트</th>
                            <td class="table_txt_left f_blue ">${boardView.order_no }</td>
                        </tr>
                        <tr>
                        	<th scope="row" class="table_txt_left">사건명</th>
                            <td class="table_txt_left">${boardView.case_name}</td>
                            <th scope="row" class="table_txt_left">공개여부</th>
                            <td class="table_txt_left">
							<c:if test="${boardView.open_flag == 'N' }"><img src="/images/admin/icon_close.gif" alt="비공개" width="49" height="16"/></c:if>
 							<c:if test="${boardView.open_flag == 'Y' }"><img src="/images/admin/icon_open.gif" alt="공개"/></c:if>
 							</td> 
                        </tr>
                        <tr>
                        	<th scope="row" class="table_txt_left">부서명</th>
                      		<td class="table_txt_left" >${boardView.mem_dept}</td> 
                        	<th scope="row" class="table_txt_left">소가</th>
                            <td class="table_txt_left">${boardView.sue_money} 원</td>
                        </tr>
                        <tr>
                        	<th scope="row" class="table_txt_left">원고</th>
                      		<td class="table_txt_left" >${boardView.plaintiff}</td> 
                        	<th scope="row" class="table_txt_left">피고</th>
                            <td class="table_txt_left">${boardView.defendant}</td>
                        </tr>
                        <tr>
                        	<th scope="row" class="table_txt_left">제(피)소</th>
                      		<td class="table_txt_left" >
							<s:if test="%{boardView.sue_flag == 1}">제소</s:if>
 							<s:else>피소</s:else>
							</td> 
                        	<th scope="row" class="table_txt_left">상태</th>
                      		<td class="table_txt_left" >
							<c:if test="${boardView.status_flag == 'P' }"><img src="/images/admin/icon_ing.gif" alt="진행" width="49" height="16"/></c:if>
							<c:if test="${boardView.status_flag == 'D' }"><img src="/images/common/btn_7.gif" alt="완료"/></c:if>
							</td> 
                        </tr>
                    	<tr>
                        	<th scope="row" class="table_txt_left">기타</th>
                      		<td class="table_txt_left" colspan="4">${boardView.etc}</td> 
                        </tr>
                        <tr>
                        <td class="table_txt_left table_td_bottom_x padding5">
	                        		<span class="f_black b">사건개요</span>
	                       </td>
	                       	    <td class="table_td_bottom_x padding5"></td>
	                            <td class="table_td_bottom_x padding5"></td>
	                        </tr>
                           <tr>
	                        	<td class="table_txt_left table_td_bottom_comment" colspan="4">${boardView.summary }</td>	                        	
	                       </tr>
					</tbody>
                 </table>
                 </div>
                 </form>
            </dd>
        </dl>
        <dl>  	
            <dd class="btn_right">
       <%-- <s:if test="%{boardView.writer.equals(#session.name)} && %{#session.position_flag.equals('admin')}"> --%>
      <%--  <s:if test="%{boardView.writer.equals(#session.name)}"> --%>
            	<input type="button" id="btnWrite" value="수정" class="input_btn_s b" />
            	<input type="button" id="btnDel" value="삭제" class="input_btn_s b" />
        <%-- </s:if> --%>
            	<input type="button" id="btnList" value="목록" class="input_btn_s b" />
            </dd>
        </dl>
        <!-- 오른쪽 내용 부분 -->
    <!-- 컨텐츠 부분 -->
<c:import url="/view/admin/include/footer/adminFooter.jsp"></c:import>
<script type="text/javascript" src="/jquery/datepicker.js"></script>
<script type="text/javascript" src="/jquery/jquery.watermarkinput.js" ></script>
<script type="text/javascript">
$().ready(function(){		
	
	$("#btnList").click(function(){
		location.href="/admin/caseList.hcom?";
	});
	
	$("#btnWrite").click(function(){
		location.href="/admin/caseupdatego.hcom?case_seq=${case_seq}&mem_dept=${mem_dept}";
	});
	
	$("#btnDel").click(function(){
		if(confirm("삭제하시겠습니까?")){
		location.href="/admin/caseDeletego.hcom?case_seq=${case_seq}";
		}
	});
	
	$("#btnSave").click(function(){
		if(validateCheck()){
			if(confirm("등록하시겠습니까?")){
		$("#boardFrm").attr('action','/admin/caseReg1s.hcom?').submit();
			}
		}
	});
	
});

function validateCheck(){	
	
	if($("#case_no").val() == ''){
		alert('번호를 입력해주십시요');
		$("#case_no").focus();
		return false;
	}
	if($("#case_date").val() == ''){
		alert('날짜를 입력해주십시요');
		return false;
	}	
	return true;
} 
</script>
